package com.dotflat.satistics.vo.general;

import lombok.Data;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2018/7/24
 * *******************************
 */
@Data
public class AllSituationVo {
    private String areaName;
    private double planAmount = 0.0;
    private double actualAmount = 0.0;
    private double leftAmount = 0.0;
    private int contractCount = 0;
    private int initiativeLeads = 0;
    private int passivityLeads = 0;

    private double unitPrice = 0.0;
    private double arrivedTransferRate = 0.0;
    private double arrivalInitiativeRate = 0.0;
    private double arrivalPassivityRate = 0.0;

    public static AllSituationVo of(String areaName, SituationVo situationVo){
        AllSituationVo vo = new AllSituationVo();
        vo.setAreaName(areaName);
        vo.setPlanAmount(situationVo.getPlanAmount());
        vo.setActualAmount(situationVo.getActualAmount());
        vo.setLeftAmount(situationVo.getLeftAmount());
        vo.setContractCount(situationVo.getContractCount());
        vo.setInitiativeLeads(situationVo.getInitiativeLeads());
        vo.setPassivityLeads(situationVo.getPassivityLeads());
        vo.setUnitPrice(situationVo.getUnitPrice());
        vo.setArrivedTransferRate(situationVo.getArrivedTransferRate());
        vo.setArrivalInitiativeRate(situationVo.getArrivalInitiativeRate());
        vo.setArrivalPassivityRate(situationVo.getArrivalPassivityRate());
        return vo;
    }
}
